home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 51 / Amiga Format CD51 (2000-03-10)(Future Publishing)(GB)[!][issue 2000-04].iso / -in_the_mag- / pdselect / charon / install_charon < prev    next >
Text File  |  2000-02-16  |  3KB  |  128 lines

  1. ; Charon install script 1.0 (1.2.2000)
  2. ;
  3. ; ©2000 Andrija Antonijevic
  4. ;
  5.  
  6. (set #exec (/ (getversion) 65536))
  7. (if (< #exec 39)
  8.     (abort "Charon needs at least OS3.0 to work.\n")
  9. )
  10.  
  11. (if (not (exists "MUI:Libs/MUI/NList.mcc"))
  12.     (abort "You don't seem to have NList MUI custom class installed.\n"
  13.             "This class in necessary for Charon to work. You can "
  14.             "get this class from Aminet "
  15.             "(currently dev/mui/MCC_NList0_89.lha)"
  16.     )
  17. )
  18.  
  19. (complete 0)
  20.  
  21. (set #source-dir
  22.     (if (= 1 (exists @icon))
  23.         (pathonly (expandpath @icon))
  24.     ;else
  25.         (expandpath @icon)
  26.     )
  27. )
  28.  
  29. (set @default-dest
  30.     (askdir
  31.         (prompt "Select the directory where you want to "
  32.                 "install Charon. A directory named Charon WILL "
  33.                 "be created and all files will be copied there."
  34.         )
  35.         (help @askdir-help)
  36.         (default @default-dest)
  37.     )
  38. )
  39.  
  40. (set @default-dest (tackon @default-dest "Charon"))
  41.  
  42. (set #ToolbarType
  43.     (askchoice
  44.         (prompt "What kind of screen will you be using Charon on?")
  45.         (help "Charon uses images for its toolbar. In order to make "
  46.               "images look as good as possible, there are three "
  47.               "versions of them for different screen resolutions."
  48.         )
  49.         (choices "2:1 (640x256 and similar)" "1:1 (640x512)" "1:1 higher resolutions (800x600 etc)")
  50.     )
  51. )
  52.  
  53. (if (= #ToolbarType 0) (set #ImageDir (tackon #source-dir "Images/640x256")))
  54. (if (= #ToolbarType 1) (set #ImageDir (tackon #source-dir "Images/640x512")))
  55. (if (= #ToolbarType 2) (set #ImageDir (tackon #source-dir "Images/800x600")))
  56.  
  57. (if (not (exists @default-dest))
  58.     (makedir @default-dest (infos))
  59. )
  60.  
  61. (complete 10)
  62.  
  63. (makedir (tackon @default-dest "Config"))
  64.  
  65. (copyfiles
  66.     (source (tackon #source-dir "Doc"))
  67.     (dest (tackon @default-dest "Doc"))
  68.     (infos)
  69.     (all)
  70. )
  71.  
  72. (complete 20)
  73.  
  74. (copyfiles
  75.     (source (tackon #source-dir "Images"))
  76.     (dest (tackon @default-dest "Images"))
  77.     (all)
  78. )
  79.  
  80. (complete 30)
  81.  
  82. (copyfiles
  83.     (source (tackon #source-dir "Libs"))
  84.     (dest (tackon @default-dest "Libs"))
  85.     (all)
  86. )
  87.  
  88. (complete 50)
  89.  
  90. (copyfiles
  91.     (source (tackon #source-dir "Rexx"))
  92.     (dest (tackon @default-dest "Rexx"))
  93.     (all)
  94. )
  95.  
  96. (complete 60)
  97.  
  98. (copyfiles
  99.     (source (tackon #source-dir "Charon"))
  100.     (dest @default-dest)
  101. )
  102.  
  103. (if (= #ToolbarType 0)
  104.     (copyfiles
  105.         (source (tackon #source-dir "CharonNonProp_info"))
  106.         (dest @default-dest)
  107.         (newname "Charon.info")
  108.     )
  109. ;else
  110.     (copyfiles
  111.         (source (tackon #source-dir "CharonProp_info"))
  112.         (dest @default-dest)
  113.         (newname "Charon.info")
  114.     )
  115. )
  116.  
  117. (complete 80)
  118.  
  119. (copyfiles
  120.     (source #ImageDir)
  121.     (dest (tackon @default-dest "Images"))
  122.     (all)
  123. )
  124.  
  125. (complete 100)
  126.  
  127. (exit "Installation finished successfully. Enjoy using Charon!")
  128.